package com.shop2cn.iapi.grouponmgr.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.grouponmgr.parameter.ProductStatusChangeBean;
import com.shop2cn.iapi.grouponmgr.service.ProductStatusChangeCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*接收商品状态修改反馈Test
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_ProductStatusChange{
	private static ProductStatusChangeBean productstatuschangeBean;
	private static ProductStatusChangeCall productstatuschangeCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("接收商品状态修改反馈Test");
	}

	@Before
	public void caseUp() {
		productstatuschangeBean=new ProductStatusChangeBean();
		productstatuschangeCall=new ProductStatusChangeCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(productstatuschangeCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ProductStatusChange_001() {
		Logger.start(true,"正确数据，成功");
		try {
			
			productstatuschangeCall.setData(productstatuschangeBean);
			productstatuschangeCall.callService();			
			Logger.verifyEquals("200", productstatuschangeCall.getString("code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}